package com.sz.biz.common.constants;

/**
 * Function: 系统常用码 <br>
 * Author: hpeng.wang <br>
 * Date: 2017-05-01 12:39:00
 */
public class CommCodes {
    //EventSource

    //订单受理异常
    //public static final Integer ORD_ORDER_UNACCEPT_ERROR_10000 = 10000;//订单状态异常;
    /*public static final Integer ORD_ORDER_UNACCEPT_ERROR_10001 = 10001;//找不到产品对应的服务列表;
    public static final Integer ORD_ORDER_UNACCEPT_ERROR_10002 = 10002;//产品未上线或产品不存在;
    public static final Integer ORD_ORDER_UNACCEPT_ERROR_10003 = 10003;//客户的账户被删除或锁定;
    public static final Integer ORD_ORDER_UNACCEPT_ERROR_10004 = 10004;//客户的账号被删除或锁定;
    public static final Integer ORD_ORDER_UNACCEPT_ERROR_10005 = 10005;//产品配置的可选服务与订单中的附加服务不一致;*/
    //物流跟踪消息的状态
    public static final Integer TRACKING_STATUS_FINISH = 1;
    public static final Integer TRACKING_STATUS_UNFINISH = 2;
    //物流跟踪消息的状态
    public static final Integer TRACKING_SYN_STATUS_DEFAULT = 1;

    //物流跟踪消息的状态
    public static final Integer TRACKING_TYPE_SYSTEM = 1;//系统发出的信息
    public static final Integer TRACKING_TYPE_SUPPER = 2;//供应商发出的信息
    public static final Integer TRACKING_TYPE_SYSTEM_AUTO = 3;//系统自动生成的提交和已受理tracking 信息
    public static final Integer TRACKING_TYPE_SYSTEM_KEFU = 4;//客服添加的,1.客服会修改订单然后手动发消息，2.客服增加子单的物流信息，然后手动发消息


    //物流状态码
    public static final String TRACKING_CODE_WAIT_PENDING = "201";//下单成功，等待系统确认
    public static final String TRACKING_CODE_WAIT_ACCEPT = "202";//订单已发送至供应商，等待受理
    public static final String TRACKING_CODE_WAIT_RECEGOOD = "203";//已成功受理，通知收货


    //服务订单的状态
    public static final Integer SERVICE_ORDER_STATUS_START = 1;
    public static final Integer SERVICE_ORDER_STATUS_END = 2;


    //系统字典获取
    public static final String SYS_DICT_BIZ_SERVICE_TYPE = "biz.service.type";
    public static final String SYS_DICT_BIZ_CARGO_TYPE = "biz.cargo.type";
    public static final String SYS_DICT_BIZ_UNIT_WEIGHT = "sys.unit.weight";
    public static final String SYS_DICT_BIZ_UNIT_LENGHT = "sys.unit.length";
    public static final String SYS_DICT_BIZ_PORT_TYPE = "biz.port.type";
    public static final String SYS_DICT_BIZ_UNIT_BASE = "biz.unit.base";
    public static final String SYS_DICT_ORD_STATUS_CODE_OPERTYPE = "ord_status_code_opertype";

    //客户消息发送方式
    public static final String SYS_DICT_MESSAGE_NOTICE_TYPE = "biz.message.notice.type";


    //用户类型表示是运营系统的用户还是客户系统的客户
    public static final String OPERATOR = "operator";
    public static final String CUSTOMER = "customer";
    //运营系统的用户类型
    public static final Integer OPERATOR_USER_TYPE = 0;
    //客户系统用户类型
    public static final Integer CUSTOMER_USER_TYPE = 1;

    /**
     * 4开头的code，完成标志为403 ， 404
     */
    public static final String ORDERSTATUSCODE_STARTCODE4 = "4";
    public static final String ORDERSTATUSCODE_STARTCODE4_END1 = "403";
    public static final String ORDERSTATUSCODE_STARTCODE4_END2 = "404";

    /**
     * 6开头的code，完成标志为602，603 ， 604
     */
    public static final String ORDERSTATUSCODE_STARTCODE6 = "6";
    public static final String ORDERSTATUSCODE_STARTCODE6_END2 = "602";
    public static final String ORDERSTATUSCODE_STARTCODE6_END3 = "603";
    public static final String ORDERSTATUSCODE_STARTCODE6_END4 = "604";

    //物流查询的类型
    public static final int ORD_TRACKING_SEARCH_TYPE_WAYBILLNO = 1;
    public static final int ORD_TRACKING_SEARCH_TYPE_SUBWAYBILLNO = 2;

    public static final String ORD_TRACKING_REGEX = "(【[^】]*】)";


    //订单code的前缀代表的意义
    // 1开头=描述订单的状态
    public static final String ORD_STATUS_CODE_PREFIX_STATUS = "1";
    // 2开头=描述操作的物流信息
    public static final String ORD_STATUS_CODE_PREFIX_OPERATE = "2";
    //3开头=描述揽收信息
    public static final String ORD_STATUS_CODE_PREFIX_REGCARGO = "3";
    //4开头=描述干线信息
    public static final String ORD_STATUS_CODE_PREFIX_MAINLINE = "4";
    //5开头=描述海关信息
    public static final String ORD_STATUS_CODE_PREFIX_CUSTOMS = "5";
    //6开头=描述配送信息
    public static final String ORD_STATUS_CODE_PREFIX_DISPATCH = "6";

    //订单对一个的物流信息， 产品已经下架
    public static final String ORD_INONLINE_FALSE__ORDER_STATUS_CODE = "205";
    //受理失败，客户账户异常
    public static final String ORD_CUSTOMER_LOCKED = "215";





    //funCode
    //funCode 三藏发出
    public static final String PLACE_TRADE_ORDER = "PLACE_TRADE_ORDER";
    public static final String FUN_CODE_00002 = "00002";
    public static final String FUN_CODE_00003 = "00003";

    /**
     * 物流的供应商
     **/
    public static final int SUPPLIER_TYPE_LOGISTICS = 1;
    /**
     * 贸易的供应商
     **/
    public static final int SUPPLIER_TYPE_TRADE = 2;

    //供应商发出
    public static final String RETURN_TRADE_ORDER_DATA = "RETURN_TRADE_ORDER_DATA";

    //合同中的field
    public static final String CONT_FIELD_TITLE_KEY = "title";
    public static final String CONT_FIELD_CONTENT_KEY = "content";

    public static final String CONT_FIELD_CONTENT_LESS_KEY = "contentLess";
    public static final String CONT_FIELD_CONTENT_STYLE_KEY = "contentStyle";

    //甲方
    public static final int CONT_CONTRACTOR_FIRST = 1;
    //乙方
    public static final int CONT_CONTRACTOR_SECOND = 2;
    //甲方key
    public static final String CONT_CONTRACTOR_FIRST_KEY = "first";
    //乙方key
    public static final String CONT_CONTRACTOR_SECOND_KEY = "second";


    //root账号
    public static final String ROOT_ACCOUNT = "root";

    public static final String ORD_ORDER_FILE_TYPE_CATALOG = "ord.attachment.type";
    public static final String TRD_ORDER_FILE_TYPE_CATALOG = "trd.order.file.type";


    public static final int TRANSPORT_SEA = 1;//海运地址
    public static final int TRANSPORT_AIR = 6;//空运地址
    public static final int TRANSPORT_LAND = 11;//陆运地址


    public static final String ORDER_FILE_COMMON_PREFIX = "P0";
    //产品服务范围-干线其他： s-起始； e-终点 l-揽收
    public final static String PRODUCT_SERVICE_REGION_START = "s";
    public final static String PRODUCT_SERVICE_REGION_END = "e";
    public final static String PRODUCT_SERVICE_REGION_PICKUP = "l";
    public final static String ORD_EXCEL_SHEET_NAME = "订单信息列表";
    public final static String FETCH_ADDRESS_NOT_IN_SERVICE_SCOPE="提货地址不在揽收服务范围内!";
    public final static String FROM_ADDRESS_NOT_IN_SERVICE_SCOPE_CUSTOMER="发件地址不在产品范围内!";
    public final static String TO_ADDRESS_NOT_IN_SERVICE_SCOPE_CUSTOMER="收件地址不在产品范围内!";

    public final static String FROM_ADDRESS_NOT_IN_SERVICE_SCOPE_OPERATION="始发地址不在产品范围内!";
    public final static String TO_ADDRESS_NOT_IN_SERVICE_SCOPE_OPERATION="目的地址不在产品范围内!";
    public final static String WEIGHT_UNIT="kg";

    //客户系统excel模板中的列数最低为77列
    public final static int ORD_CUS_EXCEL_MIN_COLUMN_SIZE = 77;
    //客户系统excel模板中的固定行数为2行
    public final static int ORD_CUS_EXCEL_MIN_ROW_SIZE = 2;
    //excel模板中最多200条订单数据,最低1条订单数据
    public final static int ORD_CUS_EXCEL_ORDER_MIN_SIZE = 1;
    public final static int ORD_CUS_EXCEL_ORDER_MAX_SIZE = 200;
    //客户留言的列数
    public final static int ORD_CUS_EXCEL_ORDER_CUSTOMERNOT_COLUMNINDEX = 48;

    public final static int ORD_CUS_EXCEL_ORDER_CUSTOMERNOT_LENGTH = 140;

    /**
     * 结算方式
     */
    //月结
    public final static int MONTH_PAID = 1;
    //半月结
    public final static int HALFMONTH_PAID = 2;
    //年结
    public final static int YEAR_PAID = 3;
    //半年结
    public final static int HALFYEAR_PAID = 4;
    //季度结
    public final static int QUARTER_PAID = 5;
    //现结
    public final static int CASH_PAID = 6;

    /**
     * 产品已审核，已上线
     */
    public final static String ONLINE = "1";
    public final static int AUDIT = 3;
    /**
     * 货物最小数量和最大数量
     */
    public static final int PACKAGE_MIN_NUM = 1;
    public static final int PACKAGE_MAX_NUM = 99;

    /**
     * hsCode 最大长度10
     */
    public static final int HSCODE_MAX_LEN = 10;

    public static final String ADDRESS_TYPE_FROM = "from";
    public static final String ADDRESS_TYPE_TO = "to";
    public static final String ADDRESS_TYPE_FETCH = "fetch";
    /**
     * 上传excel时，校验
     */
    public static final String CHECK_FOR_UPLOAD_ORDER_EXCEL="checkForExcel";
    /**
     * 修改时，校验
     */
    public static final String CHECK_FOR_UPDATE="checkForUpdate";

    public static final int REGION_SEA_ADDRESS_TYPE = 5;//分区海运地址标识
    public static final int REGION_AIR_ADDRESS_TYPE = 6;//分区空运地址标识


    public static final int PRODUCT_ACCETP_TYPE_AUTO = 0;//产品的受理状态
    public static final int PRODUCT_ACCETP_TYPE_MANUAL = 1;//产品的受理状态

    //工单的状态
    //一般状态
    public static final int CSR_WORK_ORDER_PRIORITY_GENERAL = 0;
    //紧急
    public static final int CSR_WORK_ORDER_PRIORITY_URGENT = 1;
    //非常紧急
    public static final int CSR_WORK_ORDER_PRIORITY_VERY_URGENT = 2;



    //客户的账号联系人的类别
    public static final String CUS_BUS_CONTACT_SYS_GROUP_SALES = "SYS-GROUP-SALES";//销售
    public static final String CUS_BUS_CONTACT_SYS_GROUP_FD = "SYS-GROUP-FD";//财务
    public static final String CUS_BUS_CONTACT_SYS_GROUP_CSD = "SYS-GROUP-CSD";//客服


}
